home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / HyperXCmd.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.0 KB  |  149 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        HyperXCmd.a
  3. ;
  4. ;    Contains:    Interfaces for HyperCard XCMD's
  5. ;
  6. ;    Version:    Technology:    HyperCard 2.3
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1987-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__HYPERXCMD__') = 'UNDEFINED' THEN
  19. __HYPERXCMD__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__FP__') = 'UNDEFINED' THEN
  25.     include 'fp.a'
  26.     ENDIF
  27.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  28.     include 'Events.a'
  29.     ENDIF
  30.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  31.     include 'TextEdit.a'
  32.     ENDIF
  33.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  34.     include 'Menus.a'
  35.     ENDIF
  36.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  37.     include 'StandardFile.a'
  38.     ENDIF
  39.  
  40. ;  result codes 
  41.  
  42. xresSucc                        EQU        0
  43. xresFail                        EQU        1
  44. xresNotImp                        EQU        2
  45. ;  XCMDBlock constants for event.what... 
  46.  
  47. xOpenEvt                        EQU        1000                ; the first event after you are created 
  48. xCloseEvt                        EQU        1001                ; your window is being forced close (Quit?) 
  49. xGiveUpEditEvt                    EQU        1002                ; you are losing Edit... 
  50. xGiveUpSoundEvt                    EQU        1003                ; you are losing the sound channel... 
  51. xHidePalettesEvt                EQU        1004                ; someone called HideHCPalettes 
  52. xShowPalettesEvt                EQU        1005                ; someone called ShowHCPalettes 
  53. xEditUndo                        EQU        1100                ; Edit——Undo 
  54. xEditCut                        EQU        1102                ; Edit——Cut 
  55. xEditCopy                        EQU        1103                ; Edit——Copy 
  56. xEditPaste                        EQU        1104                ; Edit——Paste 
  57. xEditClear                        EQU        1105                ; Edit——Clear 
  58. xSendEvt                        EQU        1200                ; script has sent you a message (text) 
  59. xSetPropEvt                        EQU        1201                ; set a window property 
  60. xGetPropEvt                        EQU        1202                ; get a window property 
  61. xCursorWithin                    EQU        1300                ; cursor is within the window 
  62. xMenuEvt                        EQU        1400                ; user has selected an item in your menu 
  63. xMBarClickedEvt                    EQU        1401                ; a menu is about to be shown--update if needed 
  64. xShowWatchInfoEvt                EQU        1501                ; for variable and message watchers 
  65. xScriptErrorEvt                    EQU        1502                ; place the insertion point 
  66. xDebugErrorEvt                    EQU        1503                ; user clicked "Debug" at a complaint 
  67. xDebugStepEvt                    EQU        1504                ; hilite the line 
  68. xDebugTraceEvt                    EQU        1505                ; same as step but tracing 
  69. xDebugFinishedEvt                EQU        1506                ; script ended 
  70.  
  71. paletteProc                        EQU        2048                ; Windoid with grow box 
  72. palNoGrowProc                    EQU        2052                ; standard Windoid defproc 
  73. palZoomProc                        EQU        2056                ; Windoid with zoom and grow 
  74. palZoomNoGrow                    EQU        2060                ; Windoid with zoom and no grow 
  75.  
  76. hasZoom                            EQU        8
  77. hasTallTBar                        EQU        2
  78. toggleHilite                    EQU        1
  79. ;  paramCount is set to these constants when first calling special XThings 
  80.  
  81. xMessageWatcherID                EQU        -2
  82. xVariableWatcherID                EQU        -3
  83. xScriptEditorID                    EQU        -4
  84. xDebuggerID                        EQU        -5
  85. ;  XTalkObjectPtr->objectKind values 
  86.  
  87. stackObj                        EQU        1
  88. bkgndObj                        EQU        2
  89. cardObj                            EQU        3
  90. fieldObj                        EQU        4
  91. buttonObj                        EQU        5
  92. ;  selectors for ShowHCAlert's dialogs (shown as buttonID:buttonText) 
  93.  
  94. errorDlgID                        EQU        1                    ; 1:OK (default) 
  95. confirmDlgID                    EQU        2                    ; 1:OK (default) and 2:Cancel 
  96. confirmDelDlgID                    EQU        3                    ; 1:Cancel (default) and 2:Delete 
  97. yesNoCancelDlgID                EQU        4                    ; 1:Yes (default), 2:Cancel, and 3:No 
  98.  
  99. ;  type definitions 
  100. XCmdBlock                RECORD 0
  101. paramCount                 ds.w    1                ; offset: $0 (0)        ;  If = -1 then new use for XWindoids 
  102. params                     ds.l    16                ; offset: $2 (2)
  103. returnValue                 ds.l    1                ; offset: $42 (66)
  104. passFlag                 ds.b    1                ; offset: $46 (70)
  105. filler1                     ds.b    1                ; offset: $47 (71)
  106. entryPoint                 ds.l    1                ; offset: $48 (72)        ;  to call back to HyperCard 
  107. request                     ds.w    1                ; offset: $4C (76)
  108. result                     ds.w    1                ; offset: $4E (78)
  109. inArgs                     ds.l    8                ; offset: $50 (80)
  110. outArgs                     ds.l    4                ; offset: $70 (112)
  111. sizeof                     EQU *                    ; size:   $80 (128)
  112.                         ENDR
  113. ; typedef struct XCmdBlock *            XCmdPtr
  114.  
  115.  
  116. XWEventInfo                RECORD 0
  117. event                     ds        EventRecord        ; offset: $0 (0)
  118. eventWindow                 ds.l    1                ; offset: $10 (16)
  119. eventParams                 ds.l    9                ; offset: $14 (20)
  120. eventResult                 ds.l    1                ; offset: $38 (56)
  121. sizeof                     EQU *                    ; size:   $3C (60)
  122.                         ENDR
  123. ; typedef struct XWEventInfo *            XWEventInfoPtr
  124.  
  125. XTalkObject                RECORD 0
  126. objectKind                 ds.w    1                ; offset: $0 (0)        ;  stack, bkgnd, card, field, or button 
  127. stackNum                 ds.l    1                ; offset: $2 (2)        ;  reference number of the source stack 
  128. bkgndID                     ds.l    1                ; offset: $6 (6)
  129. cardID                     ds.l    1                ; offset: $A (10)
  130. buttonID                 ds.l    1                ; offset: $E (14)
  131. fieldID                     ds.l    1                ; offset: $12 (18)
  132. sizeof                     EQU *                    ; size:   $16 (22)
  133.                         ENDR
  134. ; typedef struct XTalkObject *            XTalkObjectPtr
  135.  
  136. ;  maximum number of checkpoints in a script 
  137.  
  138. maxCachedChecks                    EQU        16
  139. CheckPts                RECORD 0
  140. checks                     ds.w    16                ; offset: $0 (0)
  141. sizeof                     EQU *                    ; size:   $20 (32)
  142.                         ENDR
  143. ; typedef struct CheckPts *                CheckPtPtr
  144.  
  145. ; typedef CheckPtPtr *                    CheckPtHandle
  146.  
  147.     ENDIF ; __HYPERXCMD__ 
  148.  
  149.